<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript" src="../../d3.v2.js"></script>
    <style type="text/css">

body {
  font: 10px sans-serif;
}

.axis line, .axis path {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

    </style>
  </head>
  <body>
    <script type="text/javascript">

var margin = {top: 20, right: 40, bottom: 20, left: 40},
    width = 960 - margin.right - margin.left,
    height = 500 - margin.top - margin.bottom;

var x = d3.time.scale()
    .domain([new Date(2011, 07, 01), new Date(2011, 07, 08)])
    .range([0, width]);

var y = d3.scale.sqrt()
    .range([height, 0]);

var xAxis = d3.svg.axis()
    .scale(x)
    .ticks(d3.time.days)
    .tickFormat(d3.time.format("%m/%d"));

var yAxis = d3.svg.axis()
    .scale(y);

var svg = d3.select("body").append("svg")
    .attr("width", width + margin.right + margin.left)
    .attr("height", height + margin.top + margin.bottom)
  .append("g")
    .attr("transform", "translate(" + margin.left + "," + margin.top + ")");

svg.append("g")
    .attr("class", "bottom axis")
    .attr("transform", "translate(0," + height + ")")
    .call(xAxis.orient("bottom"));

svg.append("g")
    .attr("class", "top axis")
    .call(xAxis.orient("top"));

svg.append("g")
    .attr("class", "left axis")
    .call(yAxis.orient("left"));

svg.append("g")
    .attr("class", "right axis")
    .attr("transform", "translate(" + width + ",0)")
    .call(yAxis.orient("right"));

    </script>
  </body>
</html>
